package com.niiwoo.civet.base.enums;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum DeviceTypeEnum {
    ANDROID((byte) 0, "android"),
    IOS((byte) 1, "ios");

    public final Byte value;
    public final String desc;

    public static DeviceTypeEnum enumOf(Byte value) {
        DeviceTypeEnum[] deviceTypeEnums = DeviceTypeEnum.values();
        for(DeviceTypeEnum deviceTypeEnum: deviceTypeEnums) {
            if(deviceTypeEnum.value.equals(value)) {
                return deviceTypeEnum;
            }
        }
        return null;
    }

    public String getVersionKey() {
        return this.desc + ".version.key";
    }

    public String getDownloadUrlKey() {
        return this.desc + ".download.key";
    }
}
